package com.sihai.ehr.model.biz;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;

import com.sihai.core.BaseEntity;
import com.sihai.ehr.model.sys.AuditStatus;
import com.sihai.ehr.model.sys.InviteEnum;
import com.sihai.ehr.model.sys.Organization;

/**
 * 招聘职位申请表
 * 
 * @author Henry-PC
 * 
 */
@Entity
public class InviteApply extends BaseEntity<Long> {

	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;

	/** 组织结构 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "organization_id")
	private Organization organization;

	/** 职务ID */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "duty_id")
	private Duty duty;
	/** 职等ID */
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "grade_id")
	private Grade grade;
	
	/** 职级ID */
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "lv_id")
	private Grade gradeLevel;
	/** 招聘人数 */
	private int applyAmount;
	/** 申请日期 */
	private Date applyDate;

	private String auditingNo; /* 审核流程号 */

	/** 招聘记录状态 */
	@Enumerated(EnumType.STRING)
	private AuditStatus auditStatus;

	/** 1-删除，0-使用 */
	//@Column(length = 1)
	private boolean cancel;

	@Override
	public Long getId() {
		// TODO Auto-generated method stub
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

    public Organization getOrganization() {
        return organization;
    }

    public void setOrganization(Organization organization) {
        this.organization = organization;
    }

    public Duty getDuty() {
        return duty;
    }

    public void setDuty(Duty duty) {
        this.duty = duty;
    }

    public Grade getGrade() {
        return grade;
    }

    public void setGrade(Grade grade) {
        this.grade = grade;
    }

    public Grade getGradeLevel() {
        return gradeLevel;
    }

    public void setGradeLevel(Grade gradeLevel) {
        this.gradeLevel = gradeLevel;
    }

    public int getApplyAmount() {
        return applyAmount;
    }

    public void setApplyAmount(int applyAmount) {
        this.applyAmount = applyAmount;
    }

    public Date getApplyDate() {
        return applyDate;
    }

    public void setApplyDate(Date applyDate) {
        this.applyDate = applyDate;
    }

    public String getAuditingNo() {
		return auditingNo;
	}

	public void setAuditingNo(String auditingNo) {
		this.auditingNo = auditingNo;
	}

    public AuditStatus getAuditStatus() {
		return auditStatus;
	}

	public void setAuditStatus(AuditStatus auditStatus) {
		this.auditStatus = auditStatus;
	}

	public boolean getCancel() {
        return cancel;
    }

    public void setCancel(boolean cancel) {
        this.cancel = cancel;
    }
}
